﻿/******************************************************************************
* File description: animationState_Practice.h
* Function: 打靶动画State，用于记录当前动画的状态，并（只记录目标位置，中间过渡位置由Controller计算）
* Current Version: 1.0.0
* Author: JNN
* Date: 2025-07-01
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/

#ifndef ANIMATIONSTATE_PRACTICE_H
#define ANIMATIONSTATE_PRACTICE_H

#include <QObject>
#include <QDebug>
#include <QQueue>

#define AS_P AnimationState_Practice

class AnimationState_Practice : public QObject
{
    Q_OBJECT
public:
    AnimationState_Practice();

    void        reset();

    void        turnWheel(int direct);  // 0向左 1向下
    void        setPump1State(int state);
    void        setPump2State(int state);
    void        setPumpN2State(int state);
    void        setBottleState(int state);
    void        moveFeedPort(int posi);     // 0向上 1向下
    void        moveBar(int posi);      // 0左 1右
    void        setBlowTargetState(int state);
    void        setBrakeState(int state);
    void        setAbsorbState(int state);

    enum emBarState{
        EMPTY,
        MOV_LEFT,
        MOV_RIGHT,
        WHEEL_TURN_LEFT,
        WHEEL_TURN_DOWN,
        LOCK,
        UNLOCK
    };


public:
    // 执行队列
    QQueue<emBarState> _barOperation;

    int         _feedPortPosi = 0;  // 进料口 0在上面 1在下面
    int         _wheelAngle = 1;     // 转盘  0向左  1向下
    int         _bottleState = 0;   // 是否有靶材罐       -1不存在 0正常
    int         _barPosi = 1;       // 杆的位置 0在左 1在右
    int         _pump1State = 0;    // 左边的泵 0关 1开 -1异常
    int         _pump2State = 0;    // 右边的泵
    int         _pumpN2State = 0;   // 氦气的泵
    int         _blowTargetState = 0;    // 吹气
    int         _brakeState = 0;    // 0松开 1夹紧
    int         _absorbState = 0;   // 吸取梭体状态 0关 1开


public:





};

#endif // ANIMATIONSTATE_PRACTICE_H
